package com.wxb.mapper;

import com.wxb.domain.MallCouponEntity;

import java.util.List;
import java.util.Map;

/**
 * @Date 2025-05-28 14:21
 * @Version 1.0
 * @Description
 * @ClassName IMallCouponMapper
 **/
public interface MallCouponMapper {

    int save(MallCouponEntity t);

    void save(Map<String, Object> map);

    void saveBatch(List<MallCouponEntity> list);

    int update(MallCouponEntity t);

    int update(Map<String, Object> map);

    int delete(Object id);

    int delete(Map<String, Object> map);

    int deleteBatch(Object[] id);

    MallCouponEntity queryObject(Object id);

    List<MallCouponEntity> queryList(Map<String, Object> map);

    List<MallCouponEntity> queryList(Object id);

    int queryTotal(Map<String, Object> map);

    int queryTotal();
    /**
     * 按条件查询用户优惠券
     *
     * @param params
     * @return
     */
    List<MallCouponEntity> queryUserCoupons(Map<String, Object> params);

    /**
     * 按条件查询用户优惠券
     *
     * @param id
     * @return
     */
    MallCouponEntity getUserCoupon(Integer id);

    /**
     * 按类型查询
     *
     * @param params
     * @return
     */
    MallCouponEntity queryMaxUserEnableCoupon(Map<String, Object> params);

    /**
     * sendType = 1或4 的优惠券
     *
     * @param params
     * @return
     */
    List<MallCouponEntity> queryUserCouponList(Map<String, Object> params);

    int updateUserCoupon(MallCouponEntity couponVo);
}
